package com.szxy.frontend.portal.controller;

import com.netflix.discovery.converters.Auto;
import com.szxy.frontend.portal.service.ItemCategoryService;
import com.szxy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:zwer
 * @Date:2019/9/10 20:29
 * @Description:com.szxy.frontend.portal.controller
 * @Version:1.0
 **/
@RestController
@RequestMapping("/frontend/itemCategory")
public class ItemCategoryController {

    @Autowired
    private ItemCategoryService itemCategoryService;

    /***
     * 左侧商品分类接口
     * @return
     */
    @GetMapping("/selectItemCategoryAll")
    public Result selectItemCategoryAll(){
        try {
            return  this.itemCategoryService.selectItemCategoryAll();
        }catch (Exception e){
            e.printStackTrace();
        }
        return Result.build(500,"error");
    }

}
